<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{$setting->title ?? ''}}</title>
    <meta name="description" content="{{$setting->description ?? ''}}">
    @if (isset($setting->robots) && $setting->robots === 'on')
    <meta name="robots" content="noindex,nofollow" />
    @endif
    <link rel="stylesheet" href="/static/layui/css/layui.css">
    <link rel="stylesheet" href="/static/css/main.css">
    <script src="/static/layui/layui.js"></script>
    <script src="/static/js/main.js"></script>
</head>

<body style="background-color: #f2f2f2;">
    <!-- 头部 -->
    <header class="layui-bg-black layui-layout layui-layout-admin">
        <div class="layui-header">
            <div class="layui-container">
                <div class="layui-logo">
                    @if (isset($setting->logo) && $setting->logo)
                    <img src="{{$setting->logo}}" alt="Logo">
                    @else
                    Logo
                    @endif
                </div>
                <!-- 头部区域（可配合layui 已有的水平导航） -->
                <ul class="layui-nav layui-layout-left layui-hide-xs">
                    <li class="layui-nav-item"><a href="/" title="首页">首页</a></li>
                    {!!$menus!!}
                </ul>
                <ul class="layui-nav layui-layout-right">
                    @if ($user && isset($user->id))
                    <li class="layui-nav-item"><a href="/admins/home/index" title="控制台">控制台</a></li>
                    @else
                    <li class="layui-nav-item"><a href="javascript:;" class="login">登录</a></li>
                    @endif
                    <li class="layui-nav-item site-tree-mobile"><i class="layui-icon layui-icon-spread-left"></i></li>
                </ul>
            </div>
        </div>
        <div class="layui-side layui-bg-black">
            <div class="layui-side-scroll">
                <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
                @if($menus)
                <ul class="layui-nav layui-nav-tree" lay-filter="side-menu">
                    <li class="layui-nav-item lay-unselect nav-close" style="text-align: right;"><a href="javascript:;"><i class="layui-icon layui-icon-close"></i></a></li>
                    <li class="layui-nav-item">
                        <div class="layui-form">
                            <div class="layui-inline">
                                <input type="text" name="search" style="width: 180px;margin: 5px 0 5px 10px;" required lay-verify="required" placeholder="搜索..." class="layui-input search-input">
                            </div>
                        </div>
                    </li>
                    {!!$menus!!}
                </ul>
                @endif
            </div>
        </div>
    </header>